﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using Model;
using BLL;
public partial class news : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadLeft();
        }
    }

    private void LoadLeft()
    {
        BllNewstype bll = new BllNewstype();
        BllNews bll1 = new BllNews();
        var list = bll.GetList(c => true, true, c => c.sort);
        StringBuilder sb = new StringBuilder();
        StringBuilder sb1 = new StringBuilder();
        for (int i = 0; i < list.Count; i++)
        {
            tb_newstype obj = list[i];
            string name = obj.name;
            sb.Append(string.Format(@"<li onclick='change({1})'><span class='s_title'>>>{0}</span></li>", name, obj.id));
        }
        left.Text = sb.ToString();
    }

}